package com.example.leetdemo.process;

import com.example.leetdemo.utils.DateUtils;
import lombok.Data;

import java.time.LocalDateTime;

public class Solution106 {


    public TreeNode buildTree(int[] inorder, int[] postorder) {


        return null;
    }



    public class TreeNode {
        int val;
        TreeNode left;
        TreeNode right;
        TreeNode() {}
        TreeNode(int val) { this.val = val; }
        TreeNode(int val, TreeNode left, TreeNode right) {
            this.val = val;
            this.left = left;
            this.right = right;
        }
    }
    @Data
    public static class TineStamp {
        public LocalDateTime time;

    }

    public static void main(String[] args) {
        LocalDateTime devTime = LocalDateTime.now();
        int minute = devTime.getMinute();
        if (minute <= 1) {
            devTime = devTime.plusMinutes(- devTime.getMinute());
        } else if (minute <= 16) {
            devTime = devTime.plusMinutes(- devTime.getMinute() + 15);
        } else if (minute <= 31) {
            devTime = devTime.plusMinutes(- devTime.getMinute() + 30);
        } else if (minute <= 46) {
            devTime = devTime.plusMinutes(- devTime.getMinute() + 45);
        } else {
            devTime = devTime.plusMinutes(- devTime.getMinute()).plusHours(1L);
        }
        devTime = DateUtils.parse(DateUtils.format(devTime, "yyyy-MM-dd HH:mm:00"));
        System.err.println(devTime);
        System.err.println(DateUtils.format(devTime));
    }
}
